﻿using System;
using System.Collections.Generic;
using System.Data;
using nkstdgia.common.ThamDinhGia.BusinessObjects;
using nkstdgia.common.ThamDinhGia.DataAccess;

namespace nkstdgia.common.ThamDinhGia.BusinessLogic
{
    public class THUA_DATBL
    {
        #region ***** Init Methods *****

        THUA_DATDA objTHUA_DATDA;

        public THUA_DATBL()
        {
            objTHUA_DATDA = new THUA_DATDA();
        }

        #endregion ***** Init Methods *****

        #region ***** Get Methods *****

        /// <summary>
        /// Get THUA_DAT by ma_ho_so
        /// </summary>
        /// <param name="ma_ho_so">MA_HO_SO</param>
        /// <returns>THUA_DAT</returns>
        public THUA_DAT GetByMA_HO_SO(Int64 ma_ho_so)
        {
            return objTHUA_DATDA.GetByMA_HO_SO(ma_ho_so);
        }

        /// <summary>
        /// Get all of THUA_DAT
        /// </summary>
        /// <returns>List<<THUA_DAT>></returns>
        public List<THUA_DAT> GetList()
        {
            return objTHUA_DATDA.GetList();
        }

        /// <summary>
        /// Get DataSet of THUA_DAT
        /// </summary>
        /// <returns>DataSet</returns>
        public DataSet GetDataSet()
        {
            return objTHUA_DATDA.GetDataSet();
        }

        /// <summary>
        /// Get all of THUA_DAT paged
        /// </summary>
        /// <param name="recperpage">recperpage</param>
        /// <param name="pageindex">pageindex</param>
        /// <returns>List<<THUA_DAT>></returns>
        public List<THUA_DAT> GetListPaged(int recperpage, int pageindex)
        {
            return objTHUA_DATDA.GetListPaged(recperpage, pageindex);
        }

        /// <summary>
        /// Get DataSet of THUA_DAT paged
        /// </summary>
        /// <param name="recperpage">recperpage</param>
        /// <param name="pageindex">pageindex</param>
        /// <returns>DataSet</returns>
        public DataSet GetDataSetPaged(int recperpage, int pageindex)
        {
            return objTHUA_DATDA.GetDataSetPaged(recperpage, pageindex);
        }

        #endregion ***** Get Methods *****

        #region ***** Add Update Delete Methods *****

        /// <summary>
        /// Add a new THUA_DAT within THUA_DAT database table
        /// </summary>
        /// <param name="obj_thua_dat">THUA_DAT</param>
        /// <returns>key of table</returns>
        public long Add(THUA_DAT obj_thua_dat)
        {
            return objTHUA_DATDA.Add(obj_thua_dat);
        }

        /// <summary>
        /// updates the specified THUA_DAT
        /// </summary>
        /// <param name="obj_thua_dat">THUA_DAT</param>
        /// <returns></returns>
        public void Update(THUA_DAT obj_thua_dat)
        {
            objTHUA_DATDA.Update(obj_thua_dat);
        }

        /// <summary>
        /// Delete the specified THUA_DAT
        /// </summary>
        /// <param name="ma_ho_so">MA_HO_SO</param>
        /// <returns></returns>
        public void Delete(Int64 ma_ho_so)
        {
            objTHUA_DATDA.Delete(ma_ho_so);
        }

        #endregion ***** Add Update Delete Methods *****
    }
}